package com.boronstream.istar.model;

import java.io.Serializable;
import java.util.Iterator;

import org.json.JSONException;
import org.json.JSONObject;

public abstract class PlayObject implements Serializable {
	private static final long serialVersionUID = 1L;
	int identifer;

	public int getIdentifer() {
		return this.identifer;
	}

	public abstract void initParamWithJsonAndKey(JSONObject paramJSONObject,
			String paramString) throws JSONException;

	public void initWithJson(JSONObject paramJSONObject) {
		if (paramJSONObject == null) {
			return;
		}

		Iterator localIterator = paramJSONObject.keys();
		while (localIterator.hasNext()) {
			String str = (String) localIterator.next();
			try {
				initParamWithJsonAndKey(paramJSONObject, str);
			} catch (Exception localException) {
			}
		}
	}

	public void setIdentifer(int paramInt) {
		this.identifer = paramInt;
	}
}